Skip to content

Conversation

@kxxt
Copy link
Contributor

@kxxt kxxt commented Jan 9, 2026

This PR fixes JIT compilation error and disassembling error when enabling the RISC-V C extension in V8.

This is only need in v25.x, the v8 version on the main branch already contains the fix.

Original commit message:

[riscv] Fix compilation error and disassembling error when enabling the RISC-V C extension

Change-Id: I34a930f7bcda514698ce64d132cbe05fa32b323c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6934163
Reviewed-by: Yahan Lu (LuYahan) <[email protected]>
Reviewed-by: Kasper Lund <[email protected]>
Commit-Queue: Yahan Lu (LuYahan) <[email protected]>
Cr-Commit-Position: refs/heads/main@{#102431}

Refs: v8/v8@209d2db

Thanks for @luyahan for pointing out the fix and @RevySR for verifying it on node v25.2.1!

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v25.x Issues that can be reproduced on v25.x or PRs targeting the v25.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Jan 9, 2026
@sxa
Copy link
Member

sxa commented Jan 9, 2026

@kxxt Just to check - this is an issue at runtime when you run with --riscv-c-extension? I was a bit confused by this issue saying it was a compilation failure and thought it was something that showed up when you were running the node build ...

Scratch that - have confirmed the problem with a v25.x-staging build and also that this fixes it. Failure was as follows:

sxa@bananapif3:~$ ./node25xs1-vanilla --riscv-c-extension


#
# Fatal error in , line 0
# Check failed: kMaxSizeOfMoveAfterFastCall == pc_offset() - before_offset.
#
#
#
#FailureMessage Object: 0x3fdc0423a0
----- Native stack trace -----

 1: 0x5aee44  [./node25xs1-vanilla]
 2: 0x1d48566 V8_Fatal(char const*, ...) [./node25xs1-vanilla]
 3: 0x116c8da  [./node25xs1-vanilla]
 4: 0x116ca70  [./node25xs1-vanilla]
 5: 0x11863b6  [./node25xs1-vanilla]
 6: 0xe1c616  [./node25xs1-vanilla]
 7: 0xe44fbe  [./node25xs1-vanilla]
 8: 0xe45546  [./node25xs1-vanilla]
 9: 0xe46a48  [./node25xs1-vanilla]
10: 0xe6ddc8  [./node25xs1-vanilla]
11: 0x12e5e24  [./node25xs1-vanilla]
Trace/breakpoint trap
sxa@bananapif3:~$ 

@aduh95 aduh95 requested a review from a team as a code owner January 9, 2026 23:32
@kxxt
Copy link
Contributor Author

kxxt commented Jan 9, 2026

@kxxt Just to check - this is an issue at runtime when you run with --riscv-c-extension? I was a bit confused by this issue saying it was a compilation failure and thought it was something that showed up when you were running the node build ...

Scratch that - have confirmed the problem with a v25.x-staging build and also that this fixes it. Failure was as follows:

sxa@bananapif3:~$ ./node25xs1-vanilla --riscv-c-extension


#
# Fatal error in , line 0
# Check failed: kMaxSizeOfMoveAfterFastCall == pc_offset() - before_offset.
#
#
#
#FailureMessage Object: 0x3fdc0423a0
----- Native stack trace -----

 1: 0x5aee44  [./node25xs1-vanilla]
 2: 0x1d48566 V8_Fatal(char const*, ...) [./node25xs1-vanilla]
 3: 0x116c8da  [./node25xs1-vanilla]
 4: 0x116ca70  [./node25xs1-vanilla]
 5: 0x11863b6  [./node25xs1-vanilla]
 6: 0xe1c616  [./node25xs1-vanilla]
 7: 0xe44fbe  [./node25xs1-vanilla]
 8: 0xe45546  [./node25xs1-vanilla]
 9: 0xe46a48  [./node25xs1-vanilla]
10: 0xe6ddc8  [./node25xs1-vanilla]
11: 0x12e5e24  [./node25xs1-vanilla]
Trace/breakpoint trap
sxa@bananapif3:~$ 

Ah, compilation error here should mean V8 JIT compilation error. I copied the words from the V8 commit msg, I have updated the description to avoid confusion.

It appears that the 25.x-staging branch has been force pushed. I will rebase this PR shortly.

@aduh95
Copy link
Contributor

aduh95 commented Jan 9, 2026

It appears that the 25.x-staging branch has been force pushed. I will rebase this PR shortly.

FYI it will be force pushed again next week when the security release gets released, you might prefer waiting for that before rebasing.

@kxxt
Copy link
Contributor Author

kxxt commented Jan 9, 2026

It appears that the 25.x-staging branch has been force pushed. I will rebase this PR shortly.

FYI it will be force pushed again next week when the security release gets released, you might prefer waiting for that before rebasing.

Thanks for the heads up. Let's wait until the security release is done.

gurgunday and others added 17 commits January 13, 2026 10:05
PR-URL: nodejs#60854
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Ilyas Shabi <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs#61164
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: theanarkh <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: nodejs#61158
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#60711
Refs: nodejs#60670
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Vladimir Morozov <[email protected]>
PR-URL: nodejs#61230
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.8.4 to 31.9.0.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](cachix/install-nix-action@0b0e072...4e002c8)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61236
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.9 to 8.0.0.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@84ae59a...98357b1)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61237
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@330a01c...b7c566a)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61238
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@1af3b93...8e8c483)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61239
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.5.1 to 5.5.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@5a10915...671740a)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 5.5.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61240
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.6 to 4.31.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@fe4161a...5d4e8d1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61241
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@018cc2c...37930b1)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61242
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@0057852...9255dc7)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61243
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@2028fbc...395ad32)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61244
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.2 to 2.14.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](step-security/harden-runner@95d9a5d...20cf305)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61245
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Bumps the eslint group in /tools/eslint with 2 updates: [eslint](https://github.com/eslint/eslint) and [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc).

Updates `eslint` from 9.39.1 to 9.39.2
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.1...v9.39.2)

Updates `eslint-plugin-jsdoc` from 61.4.1 to 61.5.0
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](gajus/eslint-plugin-jsdoc@v61.4.1...v61.5.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.39.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: eslint-plugin-jsdoc
  dependency-version: 61.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#61246
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
joyeecheung and others added 18 commits January 13, 2026 10:05
This helps diffing snapshots when the reproducibility gets broken.

PR-URL: nodejs#61101
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
PR-URL: nodejs#61250
Fixes: nodejs#61018
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Security release automation requires that all backport commits
include PR-URL metadata in their commit messages.

Signed-off-by: RafaelGSS <[email protected]>
PR-URL: nodejs#61256
Refs: nodejs/node-core-utils#1022
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
This requires setting BUILDING_V8_PLATFORM_SHARED to expose the
public symbols since we build with hidden visibility by default.

PR-URL: nodejs#61144
Fixes: nodejs#61102
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
PR-URL: nodejs#61260
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#61261
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#61255
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruy Adorno <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
PR-URL: nodejs#61270
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#61271
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#61267
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#61297
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
PR-URL: nodejs#61273
Refs: nodejs#58378
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#61279
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
PR-URL: nodejs#61280
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Original commit message:

    [riscv] Fix compilation error and disassembling error when enabling the RISC-V C extension

    Change-Id: I34a930f7bcda514698ce64d132cbe05fa32b323c
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6934163
    Reviewed-by: Yahan Lu (LuYahan) <[email protected]>
    Reviewed-by: Kasper Lund <[email protected]>
    Commit-Queue: Yahan Lu (LuYahan) <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#102431}

Refs: v8/v8@209d2db
Co-authored-by: kxxt <[email protected]>
@kxxt
Copy link
Contributor Author

kxxt commented Jan 13, 2026

I just saw the 25.3 security release on oss-security mailing list.

I have rebased this PR.

@kxxt
Copy link
Contributor Author

kxxt commented Jan 14, 2026

I don't think the CI failures are related. This PR only touches V8 RISC-V code, which is not even compiled in the CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. v25.x Issues that can be reproduced on v25.x or PRs targeting the v25.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.